The present invention relates to a method of and an apparatus for preventing tool collision to avoid interference between movable members such as a plurality of tool posts by automatically altering a machining program when such interference occurs.
Machine tools are numerically controlled for automatically machining workpieces. To machine a workpiece to a design drawing with a numerically controlled machine tool, numerical control commands in a prescribed format, i.e., a machining program, must be input to a numerical control apparatus.
A machining program for such a numerical control apparatus makes it possible to control a multi-axis for moving two tool posts, i.e., tool rests, independently to enable the two tool rests to cut the workpiece simultaneously. For example, a four-axis lathe shown in FIG. 4 has two tool rests TP1 and TP2 and moves the tool rests TP1 and TP2 independently along X- and Z- axes for machining a workpiece WK. By controlling the positions and paths of these tool rests TP1 and TP 2 according to a machining program comprising independent programs for the respective tool rests, the workpiece WK can be machined to a desired shape in a much shorter period of time than would be possible with an ordinary two-axis lathe.
Since, however, the single workpiece WK is simultaneously machined by the two tool rests TP1 and TP2, an accident may possibly occur due to interference between the tool rests TP1 and TP2. The machining programs for the respective tool rests should be of such a nature that they will prevent collision of the tool rests TP1 and TP2. To check such an interference, an actual machining process according to the machining programs to be checked is simulated on an animated screen. A tool interference checking process is effected by visually observing a simulation and determining that a collision or interference is caused when the paths of movement of the two tool rests intersect each other. The machining program includes a program for a tool rest 1 and a program for a tool rest 2 as shown in FIG. 3(a). Denoted in FIG. 3(a) at N100, N101, N102, N103, ... are data items for numerically controlling the movement of the tool rest 1, that is, blocks of a format of numerical control commands, and N200, N201, N202, N203, ... are blocks of a format of numerical control commands for numerically controlling the movement of the tool rest 2. FIG. 3(b) illustrates the paths of movement of the tool rests 1 and 2 displayed on the animated screen of a display unit during simulation of an actual machining effected by executing the tool rest programs. As shown in FIG. 3(b), the path of the tool rest 1 crosses the path of the tool rest 2 in the block N102 for the tool rest 1 and the block N202 for the tool rest 2. It can therefore be confirmed on the display screen that the tool rests 1 and 2 will actually collide with each other at the intersection of the tool rest paths, as shown in FIG. 4.
As described above, it has heretofore been known to effect a tool interference checking process by simulating an actual machining process according to a machining program on a display screen and checking the tool rests for their mutual interference. If an interference occurs in the tool interference checking process, then the program is altered or corrected manually by the operator. Therefore, the operator is required to think each time an interference happens, or always understand accurately, what part of the machining program is to be revised and how it is to be modified. Therefore, much labor and time have been needed in preparing a machining program.